package com.spzx.test1.t10;
/*
    并非全力
*/

public class test1 {
    public static void main(String[] args) {
        MyThread t1 = new MyThread();



        new Thread(()->{
            try {

                for (int i = 0; i < 5; i++) {
                    t1.A();
                }


            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        },"线程A").start();

        new Thread(()->{
            try {
                for (int i = 0; i < 5; i++) {
                    t1.B();
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        },"线程B").start();



        new Thread(()->{
            try {
                for (int i = 0; i < 5; i++) {
                    t1.A();
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        },"线程A的朋友").start();





        new Thread(()->{
            try {
                for (int i = 0; i < 5; i++) {
                    t1.B();
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        },"线程B的朋友").start();
    }

}
